TextField.prototype.addScrollbar = function() {
	var mc = this._parent;
	var sb = mc.attachMovie('TextScrollbar', 'TextScrollbar_' + this._name, mc.getNextHighestDepth());
	sb._x = this._x + this._width + 10;
	sb.setTarget(this);
}


// ===========================================================
// - BUTTON
// ===========================================================
TextField.prototype.getButton = function(force) {
	// if force isn't true, check to see if the button exists before redrawing it
	if (force !== true) {
		if (typeof this._parent[this._name+"button_mc"] == 'movieclip') 
			return this._parent[this._name+"button_mc"];
	}
	
	// make the clip
	var current = this._parent.createEmptyMovieClip(this._name+"button_mc", this._parent.getNextHighestDepth());
	
	// move it to the right spot
	current._x = this._x;
	current._y = this._y;

	// draw the box
	var w = this.textWidth;
	var h = this.textHeight;
	
	current.beginFill(0xFF0000,0);
	current.moveTo(0, 0);
	current.lineTo(w, 0);
	current.lineTo(w, h);
	current.lineTo(0, h);
	current.lineTo(0, 0);
	current.endFill();
	
	// set a reference to the textarea
	current.theText = this;
	return current;
}

TextField.prototype.addHover = function(format) {
	//trace("addHover");
	var b = this.getButton();
	b.onRollOver = b.onDragOver = function() {
		this.theText.defaultFormat = this.theText.getTextFormat();
		this.theText.setTextFormat(format);
	}
	
	b.onRollOut = b.onDragOut = function() {
		this.theText.setTextFormat(this.theText.defaultFormat);
	}
	return b;
}

TextField.prototype.setDefaultFormat = function(f) {
	this.defaultFormat = f;
	this.setTextFormat(f);
}